package com.mazaiting.classfile.constant.info;

import com.mazaiting.classfile.ClassReader;
import com.mazaiting.classfile.constant.ConstantPool;

/**
 * 方法类型信息
 *
 * @author mazaiting
 * @since 2021/8/12
 */
public class ConstantMethodTypeInfo extends ConstantInfo{
    /**
     * 描述索引 无符号 u2
     */
    private int descriptorIndex;

    public ConstantMethodTypeInfo(ConstantPool pool) {
        super(pool);
    }

    @Override
    public void readInfo(ClassReader reader) {
        this.descriptorIndex = reader.readU2ToUnsignedShort();
    }

    @Override
    public String toString() {
        return "ConstantMethodTypeInfo{" +
                "descriptorIndex=" + descriptorIndex +
                '}';
    }
}


















